#include <iostream>
#include <map>
using namespace std;
const int maxn = 100005;
int main()
{
    int n, m, v[maxn], count, i, j, min = 0x7fffffff, flag = 1;
    map<int, int> r;
    scanf("%d%d", &n, &m);
    for (i = 1; i <= n; i++)
    {
        scanf("%d", &v[i]);
    }
    count = 0;
    j = 0;
    for (i = 1; i <= n; i++)
    {
        while (count < m)
        {
            count += v[++j];
        }
        if (count == m)
        {
            printf("%d-%d\n", i, j);
            flag = 0;
            r.clear();
        }
        else if (flag)
        {
            if (min > count)
            {
                min = count;
                r.clear();
                r[i] = j;
            }
            else if (min == count)
                r[i] = j;
        }
        count -= v[i];
    }
    for (auto it = r.begin(); it != r.end(); it++)
        printf("%d-%d\n", it->first, it->second);
    return 0;
}